import request from '@/utils/request'

// 查询学生成绩列表
export function listUser(query) {
  return request({
    url: '/system/records/scoreList',
    method: 'get',
    params: query
  })
}
// 添加学分绩点规则
export function addUser(data) {
  return request({
    url: '/system/rules/add',
    method: 'post',
    data: data
  })
}
// 学分绩点规则详情
export function jifenDetail(query) {
  return request({
    url: '/system/rules/getInfo',
    method: 'get',
    params: query
  })
}
// 查询单个学生积分列表
export function listUser2(query) {
  return request({
    url: '/system/records/listByUserId',
    method: 'get',
    params: query
  })
}
// 个人学分详情
export function recordsDetail(id) {
  return request({
    url: `/system/records/${id}`,
    method: 'get',
  })
}
// 证书生成
export function zhengShu(data) {
  return request({
    url: `/system/certificates/batchGenerateCertificateZip`,
    method: 'post',
    responseType:'blob',
    data:data
  })
}
// 个人学分编辑加分/减分
export function recordsPut(data) {
  return request({
    url: '/system/records',
    method: 'put',
    data: data
  })
}
// 积分导入
export function recordsDaoru(data){
  return request({
    url: '/system/records/batchImportCredit',
    method: 'post',
    data,
  })
}
